﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dukey.DBUtility;
using System.Configuration;
using System.Collections;

public partial class Crm_MenuList : BaseCrm
{
    private static string dal = ConfigurationManager.AppSettings["DAL"];
    public string typestr = "sqserverlData";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (dal.ToLower() == "SQLServerDAL".ToLower())//sqlserver数据库
        {
            typestr = "sqserverlData";
        }
        else
        {
            typestr = "accessdata";
        }
        gvList.DataSourceID = typestr;
    }

    protected void btnAddNew_Click(object sender, EventArgs e)
    {        
        Hashtable hs=new Hashtable();
        hs.Add("MenuID","100");
        hs.Add("MenuName","新菜单");
        BLL.DataBaseHelper.instance.Insert(hs, "Crm_Menus");
        gvList.DataSourceID = typestr;
       
    }
}
